import tkinter as tk
# 2021-06-23 10:14 by 炸天帮成员
class create_new_frame():
    def __init__(self,root_id):
        self.parent_root = root_id

        self.create_menu()
    def create_menu(self):
        self.frame = tk.Frame(self.parent_root)
        self.frame.pack()

        self.menu = tk.Menu(self.frame)
        self.menu.add_command(label="Save",command=self.save_inMenu)
        self.menu.add_command(label = "Load",command = self.load_inMenu)
        self.menu.add_command(label = "Exit",command = self.parent_root.destroy)
        self.parent_root.config(menu = self.menu)
    def save_inMenu(self):
        print("This is save_inMenu function!")
    def load_inMenu(self):
        print("This is load_inMenu function!")

if __name__=="__main__":
    root0 = tk.Tk()
    root0.geometry("400x400")

    frame_in_window_0 = create_new_frame(root0)

    root0.mainloop()
